# times = 3
# name = "yuyiyi"
# password = 20195020302068
# while(times > 0):
#     inputName = input("请输入账户名")
#     inputPassword = (int)(input("请输入学号"))
#     if(inputName == name and inputPassword == password):
#         print("登陆成功！")
#         break
#     else:
#         print("登录失败！")
#     times -= 1
#     if(times == 0):
#             print("输入次数过多，请稍后再试")
#     else:
#         print(f"你还有{times}次机会")


# 好友管理系统
friendList = ["张三","李四","王五"]
while True:
    print("=====好友管理系统=====")
    print("=====1. 添加好友=====")
    print("=====2. 删除好友=====")
    print("=====3. 备注好友=====")
    print("=====4. 展示好友=====")
    print("=====5. 退出   =====")
    num = (int)(input("请输入数字..."))
    # 1.添加好友
    if(num == 1):
        str1 = input("请输入你要添加的好友名字...")
        friendList.extend([str1])
    # 2.删除好友
    if(num == 2):
        index1 = (int)(input("请输入你要删除的好友位置..."))
        del friendList[index1-1]
    # 3.备注好友
    if(num == 3):
        index2 = (int)(input("请输入你要备注的位置..."))
        str3 = input("请输入你要备注的名字...")
        friendList[index2-1] = str3
    # 4.展示好友
    if(num == 4):
        for msg in friendList:
            print(msg,end=" ")
        print()
    # 5.退出
    if(num == 5):
        print("退出系统")
        break